﻿
@{
    ViewBag.Title = "SearchForm";
}

<h2>Search Form</h2>

<input id="search" />

<h3>KẾT QUẢ</h3>
<div id="result"></div>

@section scripts{
    <script>
        $(function () {
            $("#search").keyup(function () {
                search = $(this).val();
                $.ajax({
                    url: "/ajax/Search",
                    data: {Name: search},
                    success: function (response) {
                        $("#result").html(response);
                    }
                });
            });
        });
    </script>
}